package team2;

/**
 * QueryResult is a class that holds the information vital to a specific result of a query.
 * @author Brett Hlavinka
 */
public class QueryResult
{
    private Document document;
    private String preview;
    private double ranking;

    /**
     * The default constructor for a QueryResult
     * @param document The document that the query returned.
     * @param preview The small preview of the document that is most similar to the query.
     * @param ranking The similarity that the document has with the query.
     */
    public QueryResult(Document document, String preview, double ranking)
    {
        this.document = document;
        this.preview = preview;
        this.ranking = ranking;
    }

    /**
     * Accessor method that gives the document;
     * @return The document of the QueryResult.
     */
    public Document getDocument()
    {
        return this.document;
    }

    /**
     * Accessor method that gives the preview;
     * @return The preview of the QueryResult.
     */
    public String getPreview()
    {
        return this.preview;
    }

    /**
     * Accessor method that gives the ranking;
     * @return The ranking of the QueryResult.
     */
    public double getRanking()
    {
        return this.ranking;
    }
}
